<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<script type="text/javascript" src="validator.js"></script>
<script type="text/javascript">
    var data = {
        first_name: "Tim",
        last_name: "Duncan",
        age: "thirty",
        userName: "tim000"
    };
    validator.config = {
        first_name: "isAlphaNum",
        age: "isNumber",
        userName: "isNonEmpty"
    };

    var test_ok = validator.validate(data);
    console.log(validator.message);
    alert(test_ok);
</script>
</body>
</html>